import Request from "@/libs/request";

/**通过免登码获取钉钉用户信息 */
export const getUserInfo = (data: { code: string }) => Request.get<User.Info>('/dd/getUserInfo', data)

/**获取钉钉accesstoken */
export const getAccessToken = () => Request.get<string>('/dd/getAccessToken')

/**获取钉钉 jsapiTicket */
export const getJsapiTicket = () => Request.get<string>('/dd/getJsapiTicket')

/**根据用户Id获取用户详情 */
export const getUserInfoByUserDDId = (data: { userDDId: string }) => Request.get<User.Info>('/dd/getUserInfoByUserDDId', data, { successMessage: false })